<template>
        <button @click="router.back()">返回到主页面</button>
        <div>
            mouse Position:{{ MousePosition.x }},{{ MousePosition.y }}
        </div>
</template>
<script setup >
    import { useRouter,useRoute } from 'vue-router';
    import { useMouse } from '@vueuse/core'
    import { onMounted } from 'vue';
    // 自定义鼠标位置hook
    import useMousePosition from '../hooks/mousePosition'
    const MousePosition = useMousePosition()
    console.log(MousePosition);
    // const { x, y } = useMouse()
    const router  = useRouter()
    const route = useRoute()
    console.log(route);
    onMounted(()=>{
        document.addEventListener('mousemove',function() {
            // console.log(x.value,y.value)
        })
    })
</script>
<style scoped lang='less'>
</style>
